package com.xxtx.trade.sysUser.mapper;


import com.xxtx.trade.sysUser.bean.TradeSysMenu;
import com.xxtx.trade.sysUser.bean.TradeUserRole;
import com.xxtx.trade.sysUser.dto.TradeSysMenuDto;
import com.xxtx.trade.sysUser.vo.TradeSysMenuVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TradeSysMenuMapper {
    int deleteByPrimaryKey(String id);

    int insert(TradeSysMenu record);

    int insertSelective(TradeSysMenu record);

    TradeSysMenu selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(TradeSysMenuDto record);

    int updateByPrimaryKey(TradeSysMenu record);

    /**
     *  根据用户id 查询菜单按钮
     * @param id
     * @return
     */
    List<TradeSysMenu> selectMenuByUserId(String id);

    /**
     *  //查询所有父菜单和下面的子菜单
     * @return
     */
    List<TradeSysMenu> selectPidMenus();

    List<TradeSysMenu> selectBodyMenus(String id);
    List<TradeSysMenu> selectBodyMenuByUserId(@Param("userId") String userId,@Param("pid") String pid);
}